home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Utilities / Ghostscript / src / main.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-01-01  |  3.5 KB  |  108 lines

  1. /* Copyright (C) 1992, 1995, 1996, 1999 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of AFPL Ghostscript.
  4.   
  5.   AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author or
  6.   distributor accepts any responsibility for the consequences of using it, or
  7.   for whether it serves any particular purpose or works at all, unless he or
  8.   she says so in writing.  Refer to the Aladdin Free Public License (the
  9.   "License") for full details.
  10.   
  11.   Every copy of AFPL Ghostscript must include a copy of the License, normally
  12.   in a plain ASCII text file named PUBLIC.  The License grants you the right
  13.   to copy, modify and redistribute AFPL Ghostscript, but only under certain
  14.   conditions described in the License.  Among other things, the License
  15.   requires that the copyright notice and this notice be preserved on all
  16.   copies.
  17. */
  18.  
  19. /*$Id: main.h,v 1.2 2000/09/19 19:00:47 lpd Exp $ */
  20. /* Backward-compatible interface to gsmain.c */
  21.  
  22. #ifndef main_INCLUDED
  23. #  define main_INCLUDED
  24.  
  25. #include "imain.h"
  26. #include "iminst.h"
  27.  
  28. /*
  29.  * This file adds to imain.h some backward-compatible procedures and
  30.  * data elements that assume there is only a single instance of
  31.  * the interpreter.
  32.  */
  33.  
  34. /* ================ Data elements ================ */
  35.  
  36. /* Clients should never access these directly. */
  37.  
  38. #define gs_user_errors (gs_main_instance_default()->user_errors)
  39. #define gs_lib_path (gs_main_instance_default()->lib_path)
  40. /* gs_lib_paths removed in release 3.65 */
  41. /* gs_lib_env_path removed in release 3.65 */
  42.  
  43. /* ================ Exported procedures from gsmain.c ================ */
  44.  
  45. /* ---------------- Initialization ---------------- */
  46.  
  47. #define gs_init0(in, out, err, mlp)\
  48.   gs_main_init0(gs_main_instance_default(), in, out, err, mlp)
  49.  
  50. #define gs_init1()\
  51.   gs_main_init1(gs_main_instance_default())
  52.  
  53. #define gs_init2()\
  54.   gs_main_init2(gs_main_instance_default())
  55.  
  56. #define gs_add_lib_path(path)\
  57.   gs_main_add_lib_path(gs_main_instance_default(), path)
  58.  
  59. #define gs_set_lib_paths()\
  60.   gs_main_set_lib_paths(gs_main_instance_default())
  61.  
  62. #define gs_lib_open(fname, pfile)\
  63.   gs_main_lib_open(gs_main_instance_default(), fname, pfile)
  64.  
  65. /* ---------------- Execution ---------------- */
  66.  
  67. #define gs_run_file(fn, ue, pec, peo)\
  68.   gs_main_run_file(gs_main_instance_default(), fn, ue, pec, peo)
  69.  
  70. #define gs_run_string(str, ue, pec, peo)\
  71.   gs_main_run_string(gs_main_instance_default(), str, ue, pec, peo)
  72.  
  73. #define gs_run_string_with_length(str, len, ue, pec, peo)\
  74.   gs_main_run_string_with_length(gs_main_instance_default(),\
  75.                  str, len, ue, pec, peo)
  76.  
  77. #define gs_run_file_open(fn, pfref)\
  78.   gs_main_run_file_open(gs_main_instance_default(), fn, pfref)
  79.  
  80. #define gs_run_string_begin(ue, pec, peo)\
  81.   gs_main_run_string_begin(gs_main_instance_default(), ue, pec, peo)
  82.  
  83. #define gs_run_string_continue(str, len, ue, pec, peo)\
  84.   gs_main_run_string_continue(gs_main_instance_default(),\
  85.                   str, len, ue, pec, peo)
  86.  
  87. #define gs_run_string_end(ue, pec, peo)\
  88.   gs_main_run_string_end(gs_main_instance_default(), ue, pec, peo)
  89.  
  90. /* ---------------- Debugging ---------------- */
  91.  
  92. /*
  93.  * We should have the following definition:
  94.  
  95. #define gs_debug_dump_stack(code, peo)\
  96.   gs_main_dump_stack(gs_main_instance_default(), code, peo)
  97.  
  98.  * but we make it a procedure instead so it can be called from debuggers.
  99.  */
  100. void gs_debug_dump_stack(P2(int code, ref * perror_object));
  101.  
  102. /* ---------------- Termination ---------------- */
  103.  
  104. #define gs_finit(status, code)\
  105.   gs_main_finit(gs_main_instance_default(), status, code)
  106.  
  107. #endif /* main_INCLUDED */
  108.